<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css"></style>
<link href="../lib/styles.css" rel="stylesheet" type="text/css">
<link href="../lib/tbl_css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style25 {color: #FFFFFF}
-->
</style>
</head>
</html>
<html>
<head>
<script type="text/JavaScript">
<!--


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' harus diperbaiki\n'; }
  } if (errors) alert('Maaf data tidak boleh kosong :\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<body>
<TABLE width=100% border='0' align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
        <TR vAlign=top>
          <TD ><table width="100%"  border="0">
            <tr>
              <td height="" background="../gambar/index_07.jpg"><H6 class=title title="Detail Karyawan">Detail Karyawan</H6></td>
            </tr>
          </table></TD>
        </TR>
        <TR>
          <TD width=788 colSpan=3>
            <TABLE border=0 cellSpacing=0 cellPadding=0 width=100%>
              <TBODY>
              <TR>
                <TD><IMG border=0 alt=space 
                  src="../gambar/spacer.gif" 
                  width=1 height=1></TD></TR>
              <TR>
                <TD 
                width=788 colSpan=2 
                style="BACKGROUND: url(../images/shadow_sub_verde.gif) #f4f4f4 repeat-x">
                  <TABLE border=0 cellSpacing=0 cellPadding=0 width=788>
                    <TBODY>
                    <TR>
                      <TD width="36" rowspan="2" valign="top">&nbsp;&nbsp;<img src="../gambar/001_21.png" width="24" height="24"><IMG alt=space 
                        src="../gambar/spacer.gif" 
                        width=1 height=10></TD>
                      <TD width="752" valign="top">
					  <? if($level=="admin"){
	       echo"<a href='?act=karyawan'><span class='linkuri_bottom2'>kembali</span></a>"; }	
		   elseif(($level=="departemen_head")or($level=="karyawan")){
		   echo"<a href='?act=karyawan_level'><span class='linkuri_bottom2'>kembali</span></a>";}
		 ?>			</TD>
                    </TR>
                    <TR>
                      <TD>&nbsp;</TD>
                </TR></TBODY></TABLE></TD>
              </TR>
              <TR>
            <TD><IMG border=0 alt=space 
                  src="../gambar/spacer.gif" 
                  width=1 height=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">
	  <form action="exe_ed_master.php" method="post" enctype="multipart/form-data" name="form1" onsubmit="MM_validateForm('nik','','R','nama_karyawan','','R','tempat_lahir','','R','tanggal_lahir','','R','jenis_kelamin','','R','agama','','R','status','','R','telp','','RisNum','alamat','','R','bagian','','R');return document.MM_returnValue">
	  <table width="" border="0" align="left" cellpadding="2" cellspacing="1">
	  <? include"../koneksi/koneksi.php";
$tampil=mysql_query("select * from karyawan where nik='$nik'");
$hs=mysql_fetch_array($tampil);
{ ?>
  <tr>
 <td colspan="3" width="" ><div align="center"><? echo"<img src='../upload_photo/$hs[photo_karyawan]' width='120' height='100' border='1'>"; ?></div></td>
   
  </tr>
  <tr>
    <td width=""><div align="left">Nik</div></td>
    <td width="">:</td>
    <td width=""><div align="left">
	<input type="hidden" name="nik" maxlength="7" size="20" value="<? echo"$hs[nik]"; ?>" />
	<input type="text" disabled="disabled" name="nik" maxlength="7" size="20" value="<? echo"$hs[nik]"; ?>" />
	</div></td>
  </tr>
  <tr>
    <td><div align="left">Nama Karyawan </div></td>
    <td>:</td>
    <td><div align="left">
      <input type="text" disabled="disabled" name="nama_karyawan" maxlength="25" value="<? echo"$hs[nm_karyawan]"; ?>" size="35" />
    </div></td>
  </tr>
  <tr>
    <td><div align="left">Tempat Lahir </div></td>
    <td>:</td>
    <td><div align="left">
      <input type="text" name="tempat_lahir" disabled="disabled" maxlength="25" value="<? echo"$hs[tmpt_lhr]"; ?>" size="35" />
    </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Tanggal Lahir </div></td>
    <td>:</td>
    <td><div align="left">
      <input type="text" name="tanggal_lahir" maxlength="25" disabled="disabled" value="<? echo"$hs[tgl_lhr]"; ?>" size="35" />
    </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Jenis Kelamin </div></td>
    <td>:</td>
    <td><div align="left">	
	<? 
if ($hs['jenis_kelamin']=="Laki-laki")
	{ $cek_l="checked";
	  $cek_w="";
	}
else 
	{ $cek_l="";
	  $cek_w="checked"; }
?>
<input type="radio" name="jenis_kelamin" value="Laki-laki" disabled="disabled"
<? echo $cek_l; ?> />Laki-laki
<input type="radio" name="jenis_kelamin" value="Perempuan" disabled="disabled"
<? echo $cek_w; ?> />Perempuan
	
	</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Agama</div></td>
    <td>:</td>
    <td><div align="left">
      <input type="text" name="agama" maxlength="25" value="<? echo"$hs[agama]"; ?>" size="35" disabled="disabled" />
    </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Pendidikan</td>
    <td>:</td>

<? $tampil=mysql_query("select * from pendidikan where kd_pendidikan='$hs[kd_pendidikan]'");
$hs2=mysql_fetch_array($tampil);
{ 
$nama_pendidikan=$hs2[kd_pendidikan];
}
?>
	
    <td><input type="text" name="pendidikan" maxlength="30" value="<? echo"$nama_pendidikan"; ?>" size="35"  disabled="disabled"/></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Status</div></td>
    <td>:</td>
    <td><div align="left">
      <input disabled="disabled" type="text" name="status" maxlength="25" value="<? echo"$hs[status]"; ?>" size="35" />
    </div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Tanggal Kerja </td>
    <td>:</td>
    <td><input type="text" name="tanggal_kerja" maxlength="25" value="<? echo"$hs[tgl_kerja]"; ?>" size="35" disabled="disabled"/></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Telp</div></td>
    <td>:</td>
    <td><div align="left">
      <input type="text" name="telp" maxlength="25" value="<? echo"$hs[telp]"; ?>" size="35" disabled="disabled" />
    </div></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td valign="top"><div align="left">Alamat</div></td>
    <td valign="top">:</td>
    <td><div align="left">
	<textarea name="alamat" cols="30" rows="5" id="alamat" disabled="disabled"><? echo"$hs[alamat]"; ?></textarea></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left">Seksi</div></td>
    <td>:</td>
    <td><div align="left">
	<? echo"<select name=\"seksi\" disabled='disabled'>"; ?>
<?		
$query_mhs=mysql_query("select * from seksi");
while($row=mysql_fetch_array($query_mhs))
{
//jika ada kdmerk yg dimiliki oleh merk sama
//dengan kdmerk
//hasil query $row_kd_merk maka yg sama tadi yg di
//select otomatis

if ($hs[kd_seksi]==$row[kd_seksi])
	{
	echo "
	<option value =\"$row[kd_seksi]\"selected>$row[nm_seksi]
	</option>";
	}
else
	{
	echo"
	<option value =\"$row[kd_seksi]\">$row[nm_seksi]
	</option>";
	}
}
echo"
	</selected>";
	
?></div></td>
  </tr>
   <? 
  $ambil_pass=mysql_query("select password,nik from admin where nik='$nik'");
  $ambil_password=mysql_fetch_array($ambil_pass);
  { 
  $ambil_nik=$ambil_password[nik];
  $ambil=$ambil_password[password]; }
  ?>
  <tr>
    <td>&nbsp;</td>
    <td>Username</td>
    <td>:</td>
    <td><input type="text" name="user_name" maxlength="25" size="35" disabled="disabled" value="<? echo"$ambil_nik"; ?>"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Password</td>
    <td>:</td>
    <td><input type="text" name="pass_word" maxlength="25" size="35" value="<? echo"$ambil"; ?>" disabled="disabled" /></td>
  </tr>
</table>
<center>
</center>
</form>    </td>
  </tr>
  <tr>
    <td><p>&nbsp;</p></td>
  </tr>
  <tr>
    <td><table width="80%" border="0" align="center">
      <tr>
	  <? include"../koneksi/koneksi.php";
	  $cek=mysql_query("select count(*) as hasil from karyawan k, pengalaman p where k.nik=p.nik and p.nik='$nik'");
$cek1=mysql_fetch_row($cek);
	if($cek1[0]=='0')
	{
	$belum_ada='Belum Ada';
	}
	?>
        <td colspan="3"><div align="left" class="style14">Pengalaman Bekerja : </div>
          <span class="texttitle12A"><? echo"$belum_ada"; ?></span></td>
        </tr>
		<? include"../koneksi/koneksi.php";
	 $limit=15;
	 if(empty($halaman)){
	 $offset=0;
	 $halaman=1;}
	 else{
	 $offset=($halaman-1) * $limit; }
	 
	$lihat=mysql_query("select * from karyawan k, pengalaman p where k.nik=p.nik and p.nik='$nik' order by p.kd_pengalaman desc limit $offset,$limit");
	 while($hs=mysql_fetch_array($lihat))
	 {
?>

 <tr>
	
        <td width="25%">Pengalaman</td>
        <td width="1%">:</td>
        <td width="74%"><? echo"$hs[pengalaman]"; ?></td>
      </tr>
      <tr>
        <td>Lama</td>
        <td>:</td>
        <td><? echo"$hs[lama_pengalaman]"; ?></td>
      </tr>
      <tr>
        <td>Perusahaan</td>
        <td>:</td>
        <td><? echo"$hs[nm_perusahaan]"; ?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
	  <? } ?>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <? } ?>
  
</table>
</body>
</html>

